<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

//用户模型
class ProblemList extends Model
{

    public $timestamps = false;

    protected $table = 'problem_list';

    protected $primaryKey = 'problem_listID';
    //白名单
    protected $fillable = [
        'problem_listID',
        'title',
        'img',
        'note',
        'problem_classID',
        'sort',
        'status',
        'id',
        'time',
        'img_oss',
    ];

    protected $casts = ['img'];

    public function getImgAttribute($value)
    {
        return \App\Library\HandleFile::handleFilePath($value, $this->img_oss);
    }

}
